/*
** my_files.h for my_files in /home/comet_a//afs/local/sys_unix/my_ls/tp_stat
** 
** Made by alexandre comet
** Login   <comet_a@epitech.net>
** 
** Started on  Sat Dec  3 10:55:43 2011 alexandre comet
** Last update Sat Dec  3 15:23:33 2011 alexandre comet
*/

void		my_putchar(char c)
{
  write(1, &c, 1);
}

void            my_putstr(char *str)
{
  int           i;

  i = 0;
  while (str[i])
    my_putchar(str[i++]);
}

void		my_put_nbr(int nb)
{
  if (nb < 0)
    {
      my_putchar('-');
      nb = nb * -1;
    }
  if (nb > 9)
    my_put_nbr(nb/10);

  my_putchar((nb % 10) + 48);
}

/* PROTOS */

void		my_putchar(char c);

void		my_putstr(char *str);

void		my_put_nbr(int nb);

/* INCLUDES */

#include        <stdlib.h>
#include        <stdio.h>
#include        <sys/types.h>
#include        <dirent.h>
#include        <sys/stat.h>
#include        <unistd.h>
